<!--#include file="AspCms_StyleFun.asp" -->
<%CheckAdmin("AspCms_Style.asp")%>
<!DOCTYPE html>
<html lang="zh-CN" style="min-height: 100%;">
<head>
<title>Style</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />

<link href="https://cdn.bootcss.com/uikit/3.0.0-beta.22/css/uikit.min.css" rel="stylesheet">
<link href="https://cdn.bootcss.com/jquery.perfect-scrollbar/0.7.0/css/perfect-scrollbar.min.css" rel="stylesheet">
<link href="../css/timoo/fancySelect.css" rel="stylesheet">
<link href="../css/timoo/timoo.css" rel="stylesheet">

<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/uikit/3.0.0-beta.22/js/uikit.min.js"></script>
<script src="https://cdn.bootcss.com/uikit/3.0.0-beta.22/js/uikit-icons.min.js"></script>
<script src="https://cdn.bootcss.com/jquery.perfect-scrollbar/0.7.0/js/perfect-scrollbar.jquery.min.js"></script>
<script src="../js/timoo/icheck.min.js"></script>
<script src="../js/timoo/fancySelect.js"></script>
<script src="../js/timoo/timoo.js"></script>
</head>
<body>
<div class="tm-right">
    <div class="main">
        <div class="section setting-company">
            <form action="?" method="post" name="form">
                <div class="layout">
                    <div class="title">模板防盗</div>
                    <div class="content">
                        <div class="tm-transition list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">模板文件夹</span>
                            </div>
                            <div class="input">
                                <input type="text" name="htmlFilePath" value="<%=setting.htmlFilePath%>"> 
                            </div>
                        </div>
                        <div class="uk-clearfix tm-transition list submit">
                            <div class="uk-float-left input">
                                <input type="submit" value="修改" onClick="form.action='?action=edithtmlfilepath'">
                            </div>
                            <div class="uk-float-left input">
                                <input onClick="location.href='<%=getPageName()%>'" type="button" value="刷新"> 
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layout">
                    <div class="title">模板选择</div>
                    <div class="content">
                        <div class="template">
                            <div uk-grid>
                            <%
                                Dim folderArry,folderAttr,i,tempStr
                                folderArry=getFolderList("../../Templates")
                                if instr(folderArry(0),",")>0 then
                                    for i=0 to ubound(folderArry)
                                  
                                        folderAttr=split(folderArry(i),",")
                                        Dim xmlObj : Set xmlObj=new XmlClass

                                        if isExistFile(folderAttr(4)&"/template.xml") then
                                            xmlObj.load folderAttr(4)&"/template.xml","xmlfile"

                                            if folderAttr(0)=setting.defaultTemplate then
                                                tempStr="<input id='Use-On' class='on' type='button' value='正在使用'>"
                                            else
                                                tempStr="<input id='Use-Off' type='submit' value='使用此模板' onclick=""form.action='?action=select&style="&folderAttr(0)&"'"">"
                                            end if

                                            echo"<div class='uk-width-1-4 unit'><div class='tm-transition box'>"&vbcrlf& _
                                            "<div class='uk-cover-container picture'><img src="""&folderAttr(4)&"/"&xmlObj.getNodeValue("ScreenShot",0)&""" uk-cover></div><div class='button-use'>"&tempStr&"</div>"&vbcrlf& _
                                            "<div class='summary'>"&xmlObj.getNodeValue("description",0)&"</div>"&vbcrlf& _
                                            "</div></div>"&vbcrlf
                                        end if
                                        
                                    next
                                end if
                            %>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>